home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MPW_TOOL
/
TOOLS
/
TOOLS_WI
/
PERL
/
UNTESTED
/
EG
/
DUS
< prev
next >
Wrap
Text File
|
1991-04-28
|
557b
|
23 lines
#!/usr/bin/perl
# $Header: dus,v 4.0 91/03/20 01:09:20 lwall Locked $
# This script does a du -s on any directories in the current directory that
# are not mount points for another filesystem.
($mydev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('.');
open(ls,'ls -F1|');
while (<ls>) {
chop;
next unless s|/$||;
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($_);
next unless $dev == $mydev;
push(@ary,$_);
}
exec 'du', '-s', @ary;